﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;

namespace GBSHouse.UptimeRobot {
	public class UptimeRobotMonitorCollectionResponse {

		/// <summary>
		/// Gets or sets the status.
		/// </summary>
		/// <value>
		/// The status.
		/// </value>
		[JsonProperty("stat")]
		public string Status { get; set; }

		/// <summary>
		/// Gets or sets the monitors.
		/// </summary>
		/// <value>
		/// The monitors.
		/// </value>
		[JsonProperty("monitors")]
		public UptimeRobotMonitorCollectionResponseMonitor Monitors { get; set; }

		/// <summary>
		/// Gets or sets the monitor list.
		/// </summary>
		/// <value>
		/// The monitor list.
		/// </value>
		[JsonIgnore]
		public List<UptimeRobotMonitor> MonitorList {
			get { return this.Monitors.Monitor; }
			set { this.Monitors.Monitor = value; }
		}

		public UptimeRobotMonitorCollectionResponse() {
			this.Monitors = new UptimeRobotMonitorCollectionResponseMonitor();
		}

		public class UptimeRobotMonitorCollectionResponseMonitor {

			/// <summary>
			/// Gets or sets the monitor.
			/// </summary>
			/// <value>
			/// The monitor.
			/// </value>
			[JsonProperty("monitor")]
			public List<UptimeRobotMonitor> Monitor { get; set; }

			public UptimeRobotMonitorCollectionResponseMonitor() {
				this.Monitor = new List<UptimeRobotMonitor>();
			}
		}
	}
}
